import logging,yagmail
import os.path
import time
import pytest
from openpyxl.styles.builtins import title
import yaml


def Log():
        log2 = logging.basicConfig(level=logging.DEBUG,
                                   format='%(levelname)s %(message)s %(asctime)s %(filename)s %(lineno)d',
                                   filename='A3mall.log',
                                   filemode='a+'
                                   )
        return log2

def read_yaml(file):
    with open(file,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)

def Email():
    email=yagmail.SMTP(user='1847537889@qq.com',password='liavbivsorckhacj',host='smtp.qq.com',port=465)
    email.send(to='1522057104@qq.com',subject="A3mall.0.3版本测试结果",contents=['执行了五条用例，均通过测试'])


